import _toConsumableArray from "@babel/runtime/helpers/esm/toConsumableArray";
import _regeneratorRuntime from "@babel/runtime/regenerator";
import _asyncToGenerator from "@babel/runtime/helpers/esm/asyncToGenerator";
import _classCallCheck from "@babel/runtime/helpers/esm/classCallCheck";
import _createClass from "@babel/runtime/helpers/esm/createClass";
import _inherits from "@babel/runtime/helpers/esm/inherits";
import _createSuper from "@babel/runtime/helpers/esm/createSuper";
import _applyDecoratedDescriptor from "@babel/runtime/helpers/esm/applyDecoratedDescriptor";
import _upperFirst from "lodash/upperFirst";
import _upperCase from "lodash/upperCase";
import _isEmpty from "lodash/isEmpty";

var _dec, _dec2, _dec3, _dec4, _dec5, _dec6, _dec7, _dec8, _dec9, _dec10, _dec11, _class, _class2;

/**
 * AuthorityManagement - 租户级权限维护
 * @date: 2018-7-31

 */
import React from 'react';
import { connect } from 'dva';
import { withRouter } from 'dva/router';
import { Form, Modal, Tabs, Spin, Card } from 'antd';
import qs from 'querystring';
import { Bind } from 'lodash-decorators';
import intl from 'utils/intl';
import formatterCollections from 'utils/intl/formatterCollections';
import { Content, Header } from 'components/Page';
import Lov from 'components/Lov';
import { Button as ButtonPermission } from 'components/Permission';
import { getCurrentOrganizationId } from 'utils/utils';
import notification from 'utils/notification';
import { loadDimensionAsync, hasDimension } from "../../../../customize/dimensions";
import AuthDetail from "../../../../components/AuthorityManagement/AuthDetail";
import Company from "./Detail/Company"; // import Customer from './Detail/Customer';
// import Supplier from './Detail/Supplier';
// import Purcat from './Detail/Purcat';

import AuthorityCopy from "./Detail/AuthorityCopy";
import DimensionTab from "../../../../components/AuthorityManagement";
import styles from "./index.less?modules";
var FormItem = Form.Item;
/**
 * 使用 Tabs.TabPane 组件
 */

var TabPane = Tabs.TabPane;
/**
 * 权限复制弹出框
 * @extends {Component} - React.Component
 * @reactProps {Object} userId - 用户id
 * @reactProps {Object} copyModalVisible - 控制modal显示/隐藏属性
 * @reactProps {Function} refresh - 刷新数据
 * @reactProps {Function} authorityCopy - 控制modal显示隐藏方法
 * @reactProps {Object} organizationId - 组织编号
 * @return React.element
 */
// const AuthorityCopyModal = props => {
//   const { copyModalVisible, authorityCopy, userId, organizationId, refresh, path } = props;
//   return (
//     <Modal
//       title={intl.get('ciam.authority.view.button.copy').d('权限复制')}
//       visible={copyModalVisible}
//       onCancel={() => {
//         authorityCopy(false);
//       }}
//       width={600}
//       footer={null}
//     >
//       <AuthorityCopy
//         path={path}
//         authorityCopy={authorityCopy}
//         userId={userId}
//         organizationId={organizationId}
//         refresh={refresh}
//       />
//     </Modal>
//   );
// };

/**
 * 权限交换弹出框
 * @extends {Component} - React.Component
 * @reactProps {Object} changeModalVisible - 控制modal显示/隐藏属性
 * @reactProps {Function} changeAuthority - 交换后触发方法
 * @reactProps {Function} authorityChange - 控制modal显示隐藏方法
 * @reactProps {Object} organizationId - 组织编号
 * @return React.element
 */

var AuthorityChangeModal = Form.create({
  fieldNameProp: null
})(function (props) {
  var changeModalVisible = props.changeModalVisible,
      authorityChange = props.authorityChange,
      changeAuthority = props.changeAuthority,
      organizationId = props.organizationId,
      form = props.form,
      userId = props.userId;
  return /*#__PURE__*/React.createElement(Modal, {
    title: intl.get('ciam.authority.model.authorityManagement.authorityChange').d('权限交换'),
    visible: changeModalVisible,
    onOk: function onOk() {
      form.validateFields(function (err, fieldsValue) {
        if (!err) {
          changeAuthority(fieldsValue, form);
        }
      });
    },
    onCancel: function onCancel() {
      authorityChange(false);
    },
    width: 500
  }, /*#__PURE__*/React.createElement("div", null, intl.get('ciam.authority.view.message.title.authorityChange').d('权限交换操作会将当前用户与所选用户权限值进行互换，请谨慎操作!')), /*#__PURE__*/React.createElement(FormItem, null, form.getFieldDecorator('authorityChangeId', {
    rules: [{
      required: true,
      message: intl.get('ciam.authority.view.message.validate.tenant').d('请选择一个用户')
    }]
  })( /*#__PURE__*/React.createElement(Lov, {
    code: "CIAM.USER_AUTHORITY_USER",
    queryParams: {
      organizationId: organizationId,
      userId: userId
    }
  }))));
});
/**
 * 租户级权限管理
 * @extends {Component} - React.Component
 * @reactProps {Object} [location={}] - 当前路由信息
 * @reactProps {Object} [history={}]
 * @reactProps {Object} authorityManagement，authorityCompany，authoritySupplier，authorityPurorg，authorityPurcat，authorityCustomer - 数据源
 * @reactProps {Object} form - 表单对象
 * @reactProps {Function} [dispatch=function(e) {return e;}] - redux dispatch方法
 * @return React.element
 */

var AuthorityManagement = (_dec = formatterCollections({
  code: ['ciam.authority', 'entity.company', 'entity.customer', 'entity.supplier']
}), _dec2 = Form.create({
  fieldNameProp: null
}), _dec3 = connect(function (_ref) {
  var authorityDimension = _ref.authorityDimension,
      authorityCompany = _ref.authorityCompany,
      authorityCustomer = _ref.authorityCustomer,
      authoritySupplier = _ref.authoritySupplier,
      authorityPurorg = _ref.authorityPurorg,
      authorityPurcat = _ref.authorityPurcat,
      authorityManagement = _ref.authorityManagement,
      authorityValueList = _ref.authorityValueList,
      authorityLovView = _ref.authorityLovView,
      authorityDataSource = _ref.authorityDataSource,
      authorityDataGroup = _ref.authorityDataGroup,
      loading = _ref.loading;
  return {
    authorityDimension: authorityDimension,
    authorityCompany: authorityCompany,
    authorityCustomer: authorityCustomer,
    authoritySupplier: authoritySupplier,
    authorityPurorg: authorityPurorg,
    authorityPurcat: authorityPurcat,
    authorityManagement: authorityManagement,
    authorityValueList: authorityValueList,
    authorityLovView: authorityLovView,
    authorityDataSource: authorityDataSource,
    authorityDataGroup: authorityDataGroup,
    fetchTabListLoading: loading.effects['authorityManagement/fetchUserDimension']
  };
}), _dec4 = Bind(), _dec5 = Bind(), _dec6 = Bind(), _dec7 = Bind(), _dec8 = Bind(), _dec9 = Bind(), _dec10 = Bind(), _dec11 = Bind(), _dec(_class = _dec2(_class = _dec3(_class = withRouter(_class = (_class2 = /*#__PURE__*/function (_React$Component) {
  _inherits(AuthorityManagement, _React$Component);

  var _super = _createSuper(AuthorityManagement);

  /**
   *Creates an instance of AuthorityManagement.
   * @param {Object} props 属性
   */
  function AuthorityManagement(props) {
    var _this;

    _classCallCheck(this, AuthorityManagement);

    _this = _super.call(this, props);
    var routerParam = qs.parse(props.history.location.search.substr(1));
    var organizationId = getCurrentOrganizationId();
    _this.state = {
      dimensions: [],
      userId: routerParam.userId,
      organizationId: organizationId,
      copyModalVisible: false,
      changeModalVisible: false,
      defaultList: [],
      tabList: []
    };
    return _this;
  }
  /**
   *组件挂载后执行方法
   */


  _createClass(AuthorityManagement, [{
    key: "componentDidMount",
    value: function componentDidMount() {
      var _this2 = this;

      var tabList = this.renderDefaultTabs();
      this.setState({
        tabList: tabList
      });
      var dispatch = this.props.dispatch;
      var userId = this.state.userId; // dispatch({
      //   type: 'authorityManagement/fetchUserDimension',
      //   payload: { userId },
      // });

      dispatch({
        type: 'authorityManagement/fetchUserInfo',
        payload: {
          userId: userId
        }
      });
      dispatch({
        type: 'authorityManagement/fetchUserDimension',
        payload: {
          userId: userId
        }
      }).then(function (res) {
        if (!_isEmpty(res)) {
          var defaultList = ['PURORG', 'LOV', 'DATASOURCE', 'LOV_VIEW', 'PURAGENT', 'COMPANY', 'DATA_GROUP'];
          var arr = res.filter(function (item) {
            return defaultList.includes(item.valueSource) && item.valueSourceType === 'LOCAL';
          }).filter(function (item) {
            return !hasDimension(item);
          }).map(function (item) {
            return item.valueSource;
          });

          _this2.setState({
            defaultList: arr
          });

          _this2.loadDimensions(res);
        }
      });
    }
  }, {
    key: "componentWillUnmount",
    value: function componentWillUnmount() {
      var dispatch = this.props.dispatch; // TODO: 为了 清除缓存 需要在这里将所有model还原到初始化

      dispatch({
        type: 'authorityManagement/updateState',
        payload: {
          authorList: []
        }
      });
      dispatch({
        type: 'authorityCompany/updateState',
        payload: {
          data: [],
          checkList: [],
          originList: [],
          expandedRowKeys: []
        }
      }); // dispatch({
      //   type: 'authorityCustomer/updateState',
      //   payload: {
      //     head: {},
      //     list: [],
      //     pagination: {},
      //     customerDataSource: [],
      //     customerPagination: {},
      //   }
      // });
      // dispatch({
      //   type: 'authorityManagement/updateState',
      //   payload: {
      //     data: {
      //       list: [],
      //     },
      //   }
      // });

      dispatch({
        type: 'authorityPuragent/updateState',
        payload: {
          head: {},
          // 头部数据
          list: [],
          // 请求查询到的数据
          pagination: {},
          // 分页信息
          puragentDataSource: [],
          puragentPagination: {}
        }
      }); // dispatch({
      //   type: 'authorityPurcat/updateState',
      //   payload: {
      //     head: {},
      //     list: [],
      //     pagination: {},
      //     purcatDataSource: [],
      //     purcatPagination: {},
      //   }
      // });
      // dispatch({
      //   type: 'authorityPuritem/updateState',
      //   payload: {
      //     head: {},
      //     data: {
      //       list: [],
      //     },
      //   }
      // });

      dispatch({
        type: 'authorityPurorg/updateState',
        payload: {
          head: {},
          // 头部数据
          list: [],
          // 请求查询到的数据
          pagination: {},
          // 分页信息
          purorgDataSource: [],
          purorgPagination: {}
        }
      }); // dispatch({
      //   type: 'authoritySalitem/updateState',
      //   payload: {
      //     head: {},
      //     data: {
      //       list: [],
      //     },
      //   }
      // });
      // dispatch({
      //   type: 'authoritySupplier/updateState',
      //   payload: {
      //     head: {}, // 头部数据
      //     list: [], // 请求查询到的数据
      //     pagination: {}, // 分页信息
      //     supplierDataSource: [],
      //     supplierPagination: {},
      //   }
      // });
    }
    /**
     * 加载单独的组件, 失败返回 失败的页面
     * @param {string} code - 维度编码
     * @return {React.Component|null}
     */

  }, {
    key: "importDimension",
    value: function () {
      var _importDimension = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(code) {
        var loadDimension;
        return _regeneratorRuntime.wrap(function _callee$(_context) {
          while (1) {
            switch (_context.prev = _context.next) {
              case 0:
                loadDimension = null;
                _context.prev = 1;
                _context.next = 4;
                return loadDimensionAsync(code);

              case 4:
                loadDimension = _context.sent;
                _context.next = 10;
                break;

              case 7:
                _context.prev = 7;
                _context.t0 = _context["catch"](1);
                loadDimension = null;

              case 10:
                return _context.abrupt("return", loadDimension);

              case 11:
              case "end":
                return _context.stop();
            }
          }
        }, _callee, null, [[1, 7]]);
      }));

      function importDimension(_x) {
        return _importDimension.apply(this, arguments);
      }

      return importDimension;
    }()
    /**
     * 加载所有的维度组件
     */

  }, {
    key: "importDimensions",
    value: function () {
      var _importDimensions = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee2() {
        var _this3 = this;

        var _len,
            dimensions,
            _key,
            _args2 = arguments;

        return _regeneratorRuntime.wrap(function _callee2$(_context2) {
          while (1) {
            switch (_context2.prev = _context2.next) {
              case 0:
                for (_len = _args2.length, dimensions = new Array(_len), _key = 0; _key < _len; _key++) {
                  dimensions[_key] = _args2[_key];
                }

                return _context2.abrupt("return", Promise.all(dimensions.map(function (item) {
                  return _this3.importDimension(item.valueSource);
                })));

              case 2:
              case "end":
                return _context2.stop();
            }
          }
        }, _callee2);
      }));

      function importDimensions() {
        return _importDimensions.apply(this, arguments);
      }

      return importDimensions;
    }()
    /**
     * 将 卡片 加载成 layout
     */

  }, {
    key: "loadDimensions",
    value: function loadDimensions() {
      var _this4 = this;

      var layouts = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
      var userId = this.state.userId;
      var layout = layouts;
      var dimensions = [];
      var arr = [];
      this.importDimensions.apply(this, _toConsumableArray(layout)).then(function (cmps) {
        dimensions = layout.map(function (item, index) {
          var cmp = cmps[index];

          if (item.valueSourceType === 'LOV') {
            return {
              code: item.valueSource,
              name: item.dimensionName,
              valueSource: item.valueSource,
              component: /*#__PURE__*/React.createElement(DimensionTab, {
                code: item.viewCode,
                name: item.dimensionName,
                authorityTypeCode: item.dimensionCode,
                queryParams: {
                  userId: userId
                }
              })
            };
          }

          if (cmp) {
            arr.push(item.valueSource);

            if (cmp.__esModule) {
              var _CpaasDimension = cmp.default;
              return {
                code: item.valueSource,
                name: item.dimensionName,
                component: /*#__PURE__*/React.createElement(_CpaasDimension, {
                  dimensionParams: item,
                  queryParams: {
                    userId: userId
                  }
                })
              };
            }

            var CpaasDimension = cmp;
            return {
              code: item.valueSource,
              name: item.dimensionName,
              component: /*#__PURE__*/React.createElement(CpaasDimension, {
                dimensionParams: item,
                queryParams: {
                  userId: userId
                }
              })
            };
          }

          return {
            code: item.valueSource,
            name: item.dimensionName,
            component: /*#__PURE__*/React.createElement(Card, {
              loading: true
            })
          };
        });
      }).finally(function () {
        var defaultList = _this4.state.defaultList;

        _this4.setState({
          dimensions: dimensions,
          defaultList: defaultList.filter(function (item) {
            return !arr.includes(item);
          })
        });
      });
    }
  }, {
    key: "renderDimensions",
    value: function renderDimensions() {
      var _this$state = this.state,
          _this$state$dimension = _this$state.dimensions,
          dimensions = _this$state$dimension === void 0 ? [] : _this$state$dimension,
          defaultList = _this$state.defaultList,
          tabList = _this$state.tabList;
      return dimensions.map(function (item) {
        if (!defaultList.includes(item.code)) {
          return /*#__PURE__*/React.createElement(TabPane, {
            tab: item.name,
            key: item.name
          }, item.component);
        }

        return /*#__PURE__*/React.createElement(TabPane, {
          tab: item.name,
          key: item.name
        }, tabList.find(function (temp) {
          return temp.code === item.code;
        }).component);
      });
    }
  }, {
    key: "renderDefaultTabs",
    value: function renderDefaultTabs() {
      var path = this.props.match.path;
      var _this$state2 = this.state,
          userId = _this$state2.userId,
          organizationId = _this$state2.organizationId;
      var tabList = [{
        code: 'COMPANY',
        component: /*#__PURE__*/React.createElement(Company, {
          organizationId: organizationId,
          userId: userId,
          path: path
        })
      }, {
        code: 'PURORG',
        component: /*#__PURE__*/React.createElement(AuthDetail, {
          code: "purorg",
          name: intl.get('ciam.authority.view.message.tab.purorg').d('采购组织'),
          organizationId: organizationId,
          userId: userId,
          path: path
        })
      }, {
        code: 'PURAGENT',
        component: /*#__PURE__*/React.createElement(AuthDetail, {
          code: "puragent",
          name: intl.get('ciam.authority.view.message.tab.puragent').d('采购员'),
          organizationId: organizationId,
          userId: userId,
          path: path
        })
      }, {
        code: 'LOV',
        component: /*#__PURE__*/React.createElement(AuthDetail, {
          code: "valueList",
          name: intl.get('ciam.authority.view.message.tab.valueList').d('值集'),
          organizationId: organizationId,
          userId: userId,
          path: path
        })
      }, {
        code: 'LOV_VIEW',
        component: /*#__PURE__*/React.createElement(AuthDetail, {
          code: "lovView",
          name: intl.get('ciam.authority.view.message.tab.lovView').d('值集视图'),
          organizationId: organizationId,
          userId: userId,
          path: path
        })
      }, {
        code: 'DATASOURCE',
        component: /*#__PURE__*/React.createElement(AuthDetail, {
          code: "dataSource",
          name: intl.get('ciam.authority.view.message.tab.dataSource').d('数据源'),
          organizationId: organizationId,
          userId: userId,
          path: path
        })
      }, {
        code: 'DATA_GROUP',
        component: /*#__PURE__*/React.createElement(AuthDetail, {
          code: "dataGroup",
          name: intl.get('ciam.authority.view.message.tab.dataGroup').d('数据组'),
          organizationId: organizationId,
          userId: userId,
          path: path
        })
      }];
      return tabList;
    }
    /**
     * tab切换后查询数据
     *
     * @param {Object} name tab名称
     */

  }, {
    key: "fetchData",
    value: function fetchData(name) {
      var dispatch = this.props.dispatch;
      var userId = this.state.userId;
      var staticData = {
        userId: userId,
        page: 0,
        size: 10,
        authorityTypeCode: name === 'lovView' ? 'LOV_VIEW' : name === 'dataGroup' ? 'DATA_GROUP' : _upperCase(name)
      };
      dispatch({
        type: "authority".concat(_upperFirst(name), "/fetchAuthority").concat(_upperFirst(name)),
        payload: staticData
      });

      if (name === 'lov') {
        dispatch({
          type: "authorityValueList/fetchAuthorityValueList",
          payload: staticData
        });
      }
    }
    /**
     *刷新数据
     *
     */

  }, {
    key: "refresh",
    value: function refresh() {
      var dispatch = this.props.dispatch;
      var userId = this.state.userId;
      dispatch({
        type: 'authorityCompany/fetchAuthorityCompany',
        payload: {
          userId: userId
        }
      });
    }
    /**
     *权限交换modal显示隐藏标记
     *
     * @param {*Boolean} flag 隐藏/显示标记
     */

  }, {
    key: "authorityChange",
    value: function authorityChange(flag) {
      this.setState({
        changeModalVisible: !!flag
      });
    }
    /**
     *权限复制modal显示隐藏方法
     *
     * @param {Boolean} flag 隐藏/显示标记
     */

  }, {
    key: "authorityCopy",
    value: function authorityCopy(flag) {
      this.setState({
        copyModalVisible: !!flag
      });
    }
    /**
     *权限更改触发方法
     *
     * @param {Object} values form数据
     * @param {Object} form form表单
     */

  }, {
    key: "changeAuthority",
    value: function changeAuthority(values, form) {
      var _this5 = this;

      var dispatch = this.props.dispatch;
      var userId = this.state.userId;
      dispatch({
        type: 'authorityManagement/changeAuthority',
        payload: {
          userId: userId,
          exchanageUserId: values.authorityChangeId
        }
      }).then(function (response) {
        if (response) {
          notification.success();
          form.resetFields();

          _this5.authorityChange(false);

          _this5.refresh();
        }
      });
    }
    /**
     *渲染事件
     *
     * @returns
     */

  }, {
    key: "render",
    value: function render() {
      var _this6 = this;

      var _this$props = this.props,
          _this$props$authority = _this$props.authorityManagement.data,
          data = _this$props$authority === void 0 ? {} : _this$props$authority,
          _this$props$authority2 = _this$props.authorityManagement.authorList,
          authorList = _this$props$authority2 === void 0 ? [] : _this$props$authority2,
          _this$props$fetchTabL = _this$props.fetchTabListLoading,
          fetchTabListLoading = _this$props$fetchTabL === void 0 ? false : _this$props$fetchTabL,
          path = _this$props.match.path,
          search = _this$props.location.search;
      var _this$state3 = this.state,
          organizationId = _this$state3.organizationId,
          userId = _this$state3.userId,
          copyModalVisible = _this$state3.copyModalVisible,
          changeModalVisible = _this$state3.changeModalVisible;

      var _qs$parse = qs.parse(search.substring(1)),
          accessToken = _qs$parse.access_token;

      return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Header, {
        title: intl.get('ciam.authority.view.message.title').d('权限维护'),
        backPath: path.indexOf('/private') === 0 ? "/private/ciam/sub-account-org/users?access_token=".concat(accessToken) : '/ciam/sub-account-org/users'
      }, /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(ButtonPermission, {
        permissionList: [{
          code: "".concat(path, ".button.copy"),
          type: 'button',
          meaning: '权限维护-权限复制'
        }],
        icon: "copy",
        type: "primary",
        onClick: function onClick() {
          return _this6.authorityCopy(true);
        }
      }, intl.get('ciam.authority.view.button.copy').d('权限复制')))), /*#__PURE__*/React.createElement(Content, null, /*#__PURE__*/React.createElement("div", {
        style: {
          margin: '0 0 24px 0px',
          lineHeight: '20px'
        }
      }, /*#__PURE__*/React.createElement("span", {
        style: {
          color: '#666'
        }
      }, intl.get('ciam.authority.model.authorityManagement.userAccount').d('账号'), ":"), /*#__PURE__*/React.createElement("span", {
        style: {
          marginRight: '32px'
        }
      }, data.loginName), /*#__PURE__*/React.createElement("span", {
        style: {
          color: '#666'
        }
      }, intl.get('ciam.authority.model.authorityManagement.userName').d('描述'), ":"), /*#__PURE__*/React.createElement("span", null, data.realName)), /*#__PURE__*/React.createElement(Spin, {
        spinning: fetchTabListLoading
      }, authorList.length > 0 && /*#__PURE__*/React.createElement(Tabs, {
        defaultActiveKey: "company",
        animated: false // onChange={this.tabChange}
        ,
        tabPosition: "left",
        className: styles['sub-accout-tabs']
      }, this.renderDimensions()), _isEmpty(authorList) && !fetchTabListLoading && /*#__PURE__*/React.createElement("h3", {
        style: {
          color: 'gray',
          marginTop: '10%',
          textAlign: 'center'
        }
      }, intl.get('ciam.authority.model.authorityManagement.noAuthority').d('当前暂无可维护的数据权限'))), /*#__PURE__*/React.createElement(AuthorityCopy, {
        path: path,
        organizationId: organizationId,
        copyModalVisible: copyModalVisible,
        authorityCopy: this.authorityCopy,
        userId: userId,
        refresh: this.refresh
      }), /*#__PURE__*/React.createElement(AuthorityChangeModal, {
        changeAuthority: this.changeAuthority,
        changeModalVisible: changeModalVisible,
        authorityChange: this.authorityChange,
        userId: userId,
        organizationId: organizationId
      })));
    }
  }]);

  return AuthorityManagement;
}(React.Component), (_applyDecoratedDescriptor(_class2.prototype, "loadDimensions", [_dec4], Object.getOwnPropertyDescriptor(_class2.prototype, "loadDimensions"), _class2.prototype), _applyDecoratedDescriptor(_class2.prototype, "renderDimensions", [_dec5], Object.getOwnPropertyDescriptor(_class2.prototype, "renderDimensions"), _class2.prototype), _applyDecoratedDescriptor(_class2.prototype, "renderDefaultTabs", [_dec6], Object.getOwnPropertyDescriptor(_class2.prototype, "renderDefaultTabs"), _class2.prototype), _applyDecoratedDescriptor(_class2.prototype, "fetchData", [_dec7], Object.getOwnPropertyDescriptor(_class2.prototype, "fetchData"), _class2.prototype), _applyDecoratedDescriptor(_class2.prototype, "refresh", [_dec8], Object.getOwnPropertyDescriptor(_class2.prototype, "refresh"), _class2.prototype), _applyDecoratedDescriptor(_class2.prototype, "authorityChange", [_dec9], Object.getOwnPropertyDescriptor(_class2.prototype, "authorityChange"), _class2.prototype), _applyDecoratedDescriptor(_class2.prototype, "authorityCopy", [_dec10], Object.getOwnPropertyDescriptor(_class2.prototype, "authorityCopy"), _class2.prototype), _applyDecoratedDescriptor(_class2.prototype, "changeAuthority", [_dec11], Object.getOwnPropertyDescriptor(_class2.prototype, "changeAuthority"), _class2.prototype)), _class2)) || _class) || _class) || _class) || _class);
export { AuthorityManagement as default };